@import "theme/light.css";

html, body {
    height: 100%;
    height: -webkit-fill-available;
    width: 100%;
    overflow: hidden;

    margin: 0;
    padding: 0;

}


body {
    height: 100%;
    min-height: -webkit-fill-available;
    flex-direction: column;
    display: flex;
    background-color: var(--md-sys-color-surface-container) !important;

}

body.locked {
    overflow: hidden;
}

main {
    display: flex;
    flex-direction: row;
    height: 100%;
    max-height: -webkit-fill-available;
    width: 100%;





}

.left-content {
    flex: 0;
    padding: 0;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.main-content {
    flex: 3;
    padding: 10px;
    margin-right: 0;
    width: 100%;
    background-color: #ffffff;
    border-radius: 5px;
}


.chat-window {
    height: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 16px;
    background-color: var(--md-sys-color-surface); /* 内容背景色 */
    border-radius: 0 0 8px 8px;  /* 下圆角 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 微弱阴影 */
}



.chat-window .header {
    width: 100%;
    height: 63px;
    background-color: aqua;
}


#chat-container, #chat-container-learn1,
#chat-container-learn2, #chat-container-entertainment1,
#chat-container-entertainment2 {



    display: flex;
    flex-direction: column;
    min-height: -webkit-fill-available;

    width: 100%;
    height: 100%;
    border-radius: 26px 26px 8px 8px;
    background-color: var(--md-sys-color-surface-container);
    right: 0;


    bottom: 0;

    z-index: 999;

}

.container-messages{
    height: 100%;
}

.right-message, .left-message {
    flex-shrink: 1 !important;
    height: fit-content;
    width: fit-content;
    border-radius: 20px;

    margin-top: 12px;
    padding: 7px 10px 7px 10px;
}


.left-message{
    margin-left: 12px;
    margin-right: 60px;
    color: var(--md-sys-color-on-primary-container);
    background-color: var(--md-sys-color-primary-container);
}


.last {
    margin-bottom: 12px;
}

.loading-spinner {
    margin-left: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
    color: var(--md-sys-color-primary) !important;
    --bs-spinner-animation-speed: 5s !important;
}


.right-message {
    margin-left: auto;

    margin-right: 12px;
    color: var(--md-sys-color-on-tertiary-container);
    background-color: var(--md-sys-color-tertiary-container);
}

.right-message-container {
    margin-left: 60px;
}

.left-message p {
    width: fit-content;
}

#container-messages, #container-messages-learn1,
#container-messages-learn2, #container-messages-entertainment1,
#container-messages-entertainment2 {
    width: 100%;
    border-radius: 26px;
    flex-wrap: wrap;
    flex-grow: 1;
    display: block;

    flex-direction: row;

    background-color: var(--md-sys-color-surface);

    overflow-y: scroll;



}

#container-messages::-webkit-scrollbar, #container-messages-learn1::-webkit-scrollbar,
#container-messages-learn2::-webkit-scrollbar, #container-messages-entertainment1::-webkit-scrollbar,
#container-messages-entertainment::-webkit-scrollbar {
      display: none;
}

.sidebar-item {
    margin-left: 12px;
    margin-right: 12px;
    padding: 16px !important;
    border-radius: 26px;
    background-color: var(--md-sys-color-secondary-container) !important;
    width: 100%;
}

#badge-chat {
    width: fit-content !important;
    --bs-badge-border-radius: 0px !important;
    border-color: var(--md-sys-color-secondary) !important;

    background-color: var(--md-sys-color-secondary) !important;
    color: var(--md-sys-color-on-secondary) !important;
    padding-right: 10px !important;
}

#chat-input, #chat-input-learn1, #chat-input-learn2,
#chat-input-entertainment1, #chat-input-entertainment2{
    background-color: var(--md-sys-color-surface);
    border: 0px solid;
}

#button-send, #button-send-learn1, #button-send-learn2,
#button-send-entertainment1, #button-send-entertainment2{
    background-color: var(--md-sys-color-primary);
    outline-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-secondary);
    border: 0px solid;
}


/* 设置每个分栏的基本样式 */
.chat-column, .learning-column, .entertainment-column {
    width: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: var(--md-sys-color-surface);
    cursor: pointer;
}

/* 设置每个区域的标题 */
.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--md-sys-color-secondary-container);
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--md-sys-color-on-secondary);
    transition: background-color 0.3s ease;
}

/* 折叠后的样式 */
.chat-column.collapsed, .learning-column.collapsed, .entertainment-column.collapsed {
    height: 50px;
    margin-top: 0;
    box-shadow: none;
    background-color: var(--md-sys-color-surface-container);
}

/* 折叠时隐藏内容 */
.learning-column.collapsed .learning-window,
.entertainment-column.collapsed .entertainment-window,
.chat-column.collapsed .chat-container {
    display: none;
}

/* 每个区域内容部分 */
.learning-window, .entertainment-window{
    width: 100%;
    height: 100%;
    padding: 12px 16px;
    background-color: var(--md-sys-color-surface);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 添加内容显示的过渡效果 */
.learning-window, .entertainment-window, .chat-container {
    transition: display 0.3s ease;
}

/* 展开时显示内容 */
.chat-column:not(.collapsed) .chat-container,
.learning-column:not(.collapsed) .learning-window,
.entertainment-column:not(.collapsed) .entertainment-window{
    display: block;
}

/* 设置侧边栏菜单部分 */
.sidebar {
    width: 100%;
    height: 80px;
    padding: 12px;
    background-color: var(--md-sys-color-surface);
    box-sizing: border-box;
}

/* 菜单项目 */
.menu_container .menu_item {
    list-style-type: none;
    padding: 0;
}

.menu_item .item {
    margin: 8px 0;
}

.menu_item .item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
    background-color: var(--md-sys-color-surface-container);
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

/* 悬浮时菜单项背景色变化 */
.menu_item .item a:hover {
    background-color: var(--md-sys-color-secondary-container);
}

/* 设置每个子项的样式 */
.learning-column-learn, .entertainment-column-entertainment{
    cursor: pointer;
    padding: 10px 16px;
    background-color: var(--md-sys-color-surface-container);
    border-radius: 6px;
    color: var(--md-sys-color-on-surface);
    transition: background-color 0.3s ease;
}

.learning-column-learn:hover,
.entertainment-column-entertainment:hover {
    background-color: var(--md-sys-color-secondary-container);
}

/* 统一样式，确保表单元素对齐并且布局美观 */
.input-group-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding-top: 5px;
}

/* 上传文件输入框和语言选择框不应占满过多空间，控制最大宽度 */
.input-group-container .form-control {
    flex: 1;
}

/* 调整语言选择框的布局，使其更紧凑 */
.language-selection {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}

/* 优化整体布局，使其并排显示 */
#chat-control-learn1 .input-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 使上传文件输入框、语言选择框、消息输入框及发送按钮都在同一行显示 */
#chat-control-learn1 .input-group .form-control {
    margin-right: 10px;
}

/* 使每个表单元素占据适当宽度 */
#chat-control-learn1 .input-group input[type="file"],
#chat-control-learn1 .input-group select,
#chat-control-learn1 .input-group input[type="text"] {
    flex: 1;
}

/* 优化按钮位置，使其靠右显示 */
#chat-control-learn1 .input-group button {
    margin-left: 10px;
}

/* 调整按钮样式 */
#button-send-learn1 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* 语音合成模块样式 */
#chat-container-learn3 {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#container-messages-learn3 {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

#chat-control-learn3 {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px;
}

.input-group-container textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-size: 14px;
}

.voice-controls {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

#voice-type {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

#synthesize-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #1a73e8;
    border: none;
}

#synthesize-btn:hover {
    background: #1557b0;
}

.synthesis-result {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.synthesis-result .text {
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.synthesis-result audio {
    width: 100%;
    margin-top: 8px;
}

/* 加载状态样式 */
.bx-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}





